package com.peng.wx_official_account.controller;

import com.peng.wx_official_account.entity.enums.AreaEnum;
import com.peng.wx_official_account.service.impl.WeatherService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("test")
@RequiredArgsConstructor
public class TestController {

    private final WeatherService weatherService;


    @GetMapping
    public Map<String, String> test() {
        return weatherService.getWeather(AreaEnum.HANG_ZHOU.getLocation());
    }

}
